package com.gopay.common.riskcontrol.entity;

import com.gopay.common.domain.BaseEntity;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by zhaojt on 2016/7/29.
 * 订单风控阈值快照表
 */
@Entity
@Table(name = "RC_ORDER_THRESHOLD_SNAPSHOT")
public class RcOrderThresholdSnapshot extends BaseEntity {

    @Id
    @SequenceGenerator(name = "RC_ORDER_THRESHOLD_SNAP_SEQ_GENERATOR", sequenceName = "RC_ORDER_THRESHOLD_SNAP_SEQ", allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "RC_ORDER_THRESHOLD_SNAP_SEQ_GENERATOR")
    @Column(name = "ID")
    private Long id;

    @Column(name = "GOPAY_ORDER_ID")
    private String gopayOrderId;    // 国付宝系统订单号

    public String getGopayOrderId() {
        return gopayOrderId;
    }

    public void setGopayOrderId(String gopayOrderId) {
        this.gopayOrderId = gopayOrderId;
    }

    @Column(name = "THRESHOLD_ID")
    private Long thresholdId;       //阈值ID

    @Column(name = "RULE_ID")
    private Long ruleId;            //规则ID

    public Long getRuleId() {
        return ruleId;
    }

    public void setRuleId(Long ruleId) {
        this.ruleId = ruleId;
    }

    @Column(name = "THRESHOLD_CODE")
    private String thresholdCode;   //阈值编号

    @Column(name = "THRESHOLD_NAME")
    private String thresholdName;   //阈值名称

    @Column(name = "CYCLE_DAY")
    private Integer cycleDay;           //周期天数

    @Column(name = "CYCLE_AMOUNT")
    private BigDecimal cycleAmount;        //周期总金额

    @Column(name = "CYCLE_COUNT")
    private Integer cycleCount;         //周期总笔数

    @Column(name = "SINGLE_AMOUNT_LOW")
    private BigDecimal singleAmountLow;     //单笔下限金额

    @Column(name = "SINGLE_AMOUNT_HIGH")
    private BigDecimal singleAmountHigh;    //单笔上限金额

    @Column(name = "CREATED_TS")
    private Date createdTs;             //创建时间

    @Column(name = "TYPE")
    private String type ;               //阈值类型  1单笔 0周期

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getThresholdId() {
        return thresholdId;
    }

    public void setThresholdId(Long thresholdId) {
        this.thresholdId = thresholdId;
    }

    public String getThresholdCode() {
        return thresholdCode;
    }

    public void setThresholdCode(String thresholdCode) {
        this.thresholdCode = thresholdCode;
    }

    public Integer getCycleDay() {
        return cycleDay;
    }

    public void setCycleDay(Integer cycleDay) {
        this.cycleDay = cycleDay;
    }

    public BigDecimal getCycleAmount() {
        return cycleAmount;
    }

    public void setCycleAmount(BigDecimal cycleAmount) {
        this.cycleAmount = cycleAmount;
    }

    public Integer getCycleCount() {
        return cycleCount;
    }

    public void setCycleCount(Integer cycleCount) {
        this.cycleCount = cycleCount;
    }

    public BigDecimal getSingleAmountLow() {
        return singleAmountLow;
    }

    public void setSingleAmountLow(BigDecimal singleAmountLow) {
        this.singleAmountLow = singleAmountLow;
    }

    public BigDecimal getSingleAmountHigh() {
        return singleAmountHigh;
    }

    public void setSingleAmountHigh(BigDecimal singleAmountHigh) {
        this.singleAmountHigh = singleAmountHigh;
    }

    public Date getCreatedTs() {
        return createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    public String getThresholdName() {
        return thresholdName;
    }

    public void setThresholdName(String thresholdName) {
        this.thresholdName = thresholdName;
    }
}
